#!/usr/bin/env python
# -*- encoding: utf-8 -*-
# Project: spd-sxmcc
"""
@author: lyndon
@time Created on 2018/10/15 14:53
@desc
"""

import os, sys
reload(sys)
sys.setdefaultencoding('utf-8')

# print(os.sep)

# lis = ["D:", "ETL", "DATA", "test_file.txt"]
# fileFullPath = os.sep.join(lis)
# print(fileFullPath)
# f = open(fileFullPath, mode='r')
# content = f.read()
# print(content)
# f.close()

# lis1 = ["D:", "ETL", "DATA", "test_file.log"]
# fileFullPath1 = os.sep.join(lis1)
# f1 = open(fileFullPath1, mode='w')  # 没文件，创建文件。有文件，清除后，重新写。
# f1.write('haha,中文')
# f1.close()

f1 = open("log", mode='wb')
f1.write('附近看到中文'.encode('utf-8'))
f1.close()
